package TestPaperSystem.controller;


import TestPaperSystem.Dto.PageUtils_VO;
import TestPaperSystem.service.UserExamService;
import TestPaperSystem.utils.R;
import TestPaperSystem.utils.ResponseUtils_R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xwj
 * @since 2023-03-25
 */
@RestController
@RequestMapping("/userExam")
public class UserExamController {

    @Autowired
    UserExamService userExamService;


    /*
        个人成绩,前端传入的id可同时传入examId和userId
     */
    @PostMapping("/selfScore")
    public R selfScore(@RequestBody PageUtils_VO page) throws Exception{

        return ResponseUtils_R.success(userExamService.getMyScoreByUser(page));
    }
}

